package com.angel.service.ServiceImpl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.angel.bean.OutWebResourceUrl;
import com.angel.mapper.OutWebResourceUrlDao;
import com.angel.service.OutWebResourceUrlService;

@Service
public class OutWebResourceUrlServiceImpl implements OutWebResourceUrlService{

    @Resource
    private OutWebResourceUrlDao outWebResourceUrlDao;

    @Override
    public int insert(OutWebResourceUrl outWebResourceUrl){
        return outWebResourceUrlDao.insert(outWebResourceUrl);
    }

    @Override
    public int insertSelective(OutWebResourceUrl outWebResourceUrl){
        return outWebResourceUrlDao.insertSelective(outWebResourceUrl);
    }

    @Override
    public int insertList(List<OutWebResourceUrl> outWebResourceUrls){
        return outWebResourceUrlDao.insertList(outWebResourceUrls);
    }

    @Override
    public int update(OutWebResourceUrl outWebResourceUrl){
        return outWebResourceUrlDao.update(outWebResourceUrl);
    }

    @Override
    public List<OutWebResourceUrl> findOutWebResourceUrl(OutWebResourceUrl outWebResourceUrl) {
        return outWebResourceUrlDao.findOutWebResourceUrl(outWebResourceUrl);
    }

    @Override
    public OutWebResourceUrl findOneOutWebResourceUrl(OutWebResourceUrl outWebResourceUrl) {
        List<OutWebResourceUrl> list = this.findOutWebResourceUrl(outWebResourceUrl);
        if (list==null || list.isEmpty()){
            return null;
        }
        return list.get(0);
    }
}
